FROM registry.cn-hangzhou.aliyuncs.com/xiaoyilin/nodejs:22.19.0 AS builder
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources && \
apt-get -y update && apt-get -y install git && \
mkdir -p /usr/local/parcel-tailwindcss && \
git clone https://gitee.com/yilinxiao/parcel-tailwindcss.git /usr/local/parcel-tailwindcss && \
npm i --prefix /usr/local/parcel-tailwindcss/
# 第二阶段
FROM registry.cn-hangzhou.aliyuncs.com/xiaoyilin/nodejs:22.19.0
LABEL author=xiaoyilin
LABEL email=406735078@qq.com
COPY --from=builder /usr/local/parcel-tailwindcss/ /usr/local/parcel-tailwindcss/
WORKDIR /usr/local/parcel-tailwindcss/
ENTRYPOINT ["npx", "parcel"]
CMD ["src/index.html"]

# docker build -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/parcel-tailwindcss:20250908 .
# docker push registry.cn-hangzhou.aliyuncs.com/xiaoyilin/parcel-tailwindcss:20250908
# docker run -d -p 1234:1234 registry.cn-hangzhou.aliyuncs.com/xiaoyilin/parcel-tailwindcss:20250908

# Tailwind CSS
# https://play.tailwindcss.com/
# https://tailwindcss.com/docs/installation/using-vite